package hw;

//defines the distances between cities
public class Map {

	public double getDistance(String cityFrom, String cityTo){
		if (cityFrom.equals("Izmir")){
			if (cityTo.equals("Istanbul")) return 750;
			if (cityTo.equals("Ankara")) return 850;
			if (cityTo.equals("Bursa")) return 500;
			if (cityTo.equals("Manisa")) return 200;
		}
		if (cityFrom.equals("Istanbul")){
			if (cityTo.equals("Izmir")) return 750;
			if (cityTo.equals("Ankara")) return 450;
			if (cityTo.equals("Bursa")) return 250;
			if (cityTo.equals("Manisa")) return 550;
		}
		if (cityFrom.equals("Ankara")){
			if (cityTo.equals("Izmir")) return 850;
			if (cityTo.equals("Istanbul")) return 450;
			if (cityTo.equals("Bursa")) return 350;
			if (cityTo.equals("Manisa")) return 600;
		}
		if (cityFrom.equals("Bursa")){
			if (cityTo.equals("Izmir")) return 500;
			if (cityTo.equals("Istanbul")) return 250;
			if (cityTo.equals("Ankara")) return 350;
			if (cityTo.equals("Manisa")) return 300;
		}
		if (cityFrom.equals("Manisa")){
			if (cityTo.equals("Izmir")) return 200;
			if (cityTo.equals("Istanbul")) return 550;
			if (cityTo.equals("Bursa")) return 300;
			if (cityTo.equals("Ankara")) return 600;
		}
		return -1;
	}

		}
		
	
